package zbum.issue.issue.service.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import zbum.issue.issue.service.IssueVO;
import zbum.issue.issue.service.SearchVO;
import egovframework.rte.psl.dataaccess.EgovAbstractDAO;

/**
 * @Class Name : IssueDAO.java
 * @Description : Issue DAO Class
 * @Modification Information
 *
 * @author zbum
 * @since 2010-07-21
 * @version 1.0
 * @see
 *  
 *  Copyright (C)  All right reserved.
 */

@Repository("issueDAO")
public class IssueDAO extends EgovAbstractDAO {

	/**
	 * ISSUE을 등록한다.
	 * @param vo - 등록할 정보가 담긴 IssueVO
	 * @return 등록 결과
	 * @exception Exception
	 */
    public String insertIssue(IssueVO vo) throws Exception {
        return (String)insert("issueDAO.insertIssue_S", vo);
    }

    /**
	 * ISSUE을 수정한다.
	 * @param vo - 수정할 정보가 담긴 IssueVO
	 * @return void형
	 * @exception Exception
	 */
    public void updateIssue(IssueVO vo) throws Exception {
        update("issueDAO.updateIssue_S", vo);
    }

    /**
	 * ISSUE을 삭제한다.
	 * @param vo - 삭제할 정보가 담긴 IssueVO
	 * @return void형 
	 * @exception Exception
	 */
    public void deleteIssue(IssueVO vo) throws Exception {
        delete("issueDAO.deleteIssue_S", vo);
    }

    /**
	 * ISSUE을 조회한다.
	 * @param vo - 조회할 정보가 담긴 IssueVO
	 * @return 조회한 ISSUE
	 * @exception Exception
	 */
    public IssueVO selectIssue(IssueVO vo) throws Exception {
        return (IssueVO) selectByPk("issueDAO.selectIssue_S", vo);
    }

    /**
	 * ISSUE 목록을 조회한다.
	 * @param searchMap - 조회할 정보가 담긴 Map
	 * @return ISSUE 목록
	 * @exception Exception
	 */
    public List selectIssueList(SearchVO searchVO) throws Exception {
        return list("issueDAO.selectIssueList_D", searchVO);
    }

    /**
	 * ISSUE 총 갯수를 조회한다.
	 * @param searchMap - 조회할 정보가 담긴 Map
	 * @return ISSUE 총 갯수
	 * @exception
	 */
    public int selectIssueListTotCnt(SearchVO searchVO) {
        return (Integer)getSqlMapClientTemplate().queryForObject("issueDAO.selectIssueListTotCnt_S", searchVO);
    }

}
